Defining Sentries
To monitor an Internet server you'll first need to define a new
Sentry. To open the Sentry Configuration dialog box, choose Create
New from the Sentry section of the Object Manager, or choose Add
Sentry from the Setup pull-down menu. Select the type of server
you want to monitor by selecting one of the six server-type buttons
at the top of the Sentry Configuration window. You may define
up to 10 Sentries in PageSentry, or 100 Sentries in PageSentry
Pro. You can have each Sentry monitor a different Internet service
running on a single server, one service running on different servers,
or any combination of the two. The following section describes
the various input fields and configuration options for the different
types of Internet servers that Page Sentry is capable of monitoring.
Common Elements
Each type of Sentry is configured in two parts. The upper half
of the Configuration screen details how each individual Sentry
is configured and the bottom half of the screen is used to select
and deselect Notifiers to be triggered when a Sentry encounters
an error. We'll talk about the Notifiers in detail in the section
entitled "Defining Notifiers". Each Sentry uses a slightly
different combination of input fields in the top half of the Configuration
screen, but they all include the following fields:
- Sentry Name
- This is the name that will be reported in an e-mail message or AppleEvent
notification. You can name a Sentry anything you like, since it
has no effect on the server check, but each Sentry must have a
unique name. Also, you should choose a name that you will be
able to easily recognize when the Sentry notifies you of a problem,
such as "Primary Web Server" or "E-mail Server".
- Log File
- The Log File is where a particular Sentry will store a record of its
activities. This filename can be the same as other Sentries,
or you can have each Sentry log to a different file. To log entries
to a new log file, just type the name of the new log file in the
Log File field and it will be created automatically. Leaving
this field blank prevents PageSentry from logging anything for
this Sentry.
- Frequency
- The Frequency
setting, anywhere from one minute to one week, will determine
how often PageSentry will test the page. Pulse Sentries have a
frequency range of 10 minutes to 30 days. Checking your server
more than once a minute is probably overkill since the test performed
for a single check may in some cases take more than a minute.
Note that a single request does not usually require a great deal
of processing by a server, so there is little performance penalty
in having PageSentry check your server fairly often. In general,
having PageSentry check the page every 3 to 10 minutes will give
you timely notification without imposing a noticeable load on
your server.
Each Sentry type except the "Pulse" also has an "Execute
Test" button that lets you immediately run the test defined
for the Sentry. The ability to run Sentry tests immediately gives
you an easy way to verify that you have created the Sentry correctly.
For FTP Sentries, running the test also automatically fills
in the checksum and length fields, saving you from having to
compute these manually. Executing the test of a DNS Sentry will
autmoatically populate the IP Address field, if it has not yet
been entered.
In addition to these common fields, each Sentry will need more
information relating to the type of server being monitored. The
additional configuration information required for each type of
Sentry is explained below.
HTTP
PageSentry is capable of monitoring any type of Web server (Macintosh,
UNIX, Windows NT, etc.) by requesting a URL and examining the
returned document. This includes HTML text, CGIs, and clickable
image maps. Figure 5 shows the HTTP Sentry Configuration dialog
box.
Figure 5: Configuring a new HTTP Sentry.
To configure the Sentry just fill in the appropriate fields. In
addition to the common configuration options, the HTTP Sentry
has the following options:
- Check URL
- This is the URL that the Sentry will use to retrieve a page from your
Web server. The format should be something like this: "http://www.yourcom.com/file.html." You can omit the filename and simply get the default page from
the server or include a CGI name. As with any Web browser, you
can retrieve graphics or binary data files just by entering the
appropriate URL. You can also add a port number after the domain
name to monitor servers running on non-standard ports. For example,
"http://www.yourcom.com:8000/" would cause PageSentry
to test the server on port 8000, instead of the default port
80.
- Verify Phrase
- This is an optional field for which a Sentry can search in the page
returned from the server. If you specify a string (two or more
characters) here and the Sentry cannot find this string in the
retrieved page, the Sentry will fail and run its Notifiers (described
below). For example, you can check that a Web page contains the
string "</HTML>" to make sure that the whole file
was retrieved by a Sentry. String comparisons are not case sensitive.
It is best to specify a verify phrase that is unique to the requested
page. For example, "</HTML>" is a good default,
since it appears in most Web pages, but will also appear in most
cases when the requested file can't be found and an error file
is sent to the browser. Setting the verify phrase to a unique
string in the requested page will tell you that not only is the
server returning Web pages, but that they are the correct Web
pages.
Note that the verify phrase can also appear in the HTTP header,
as well as in the HTML page returned. This allows you to test
non-text files by setting the verify phrase to a string that will
appear in the HTTP header, such as "GIF" for GIF image
files.
- Username and Password
- The Username and Password fields can be used to test Web pages that
are protected by basic authentication by Web server realms or
products like WebLock.
SMTP
Most Internet e-mail servers use the Simple Mail Transfer Protocol
(SMTP) to transmit e-mail from server to server, including the
Apple Internet Mail Server (AIMS). PageSentry monitors this type
of server by sending an SMTP command to the server as if it were
an e-mail client or another server verifying the existence of
a user. By verifying the username, PageSentry effectively tests
the SMTP server's mail database without generating unnecessary
mail messages.
To configure the Sentry just fill in the appropriate fields. In
addition to the common configuration options, the SMTP Sentry
has the following options:
- Server Address
- This is the domain name or IP number of the SMTP server you want to
test. This is usually something like "mail.yourcom.com"or simply "yourcom.com." You can specify a non-standard
TCP port number by appending a colon and the port number to the
server address (e.g., :8001). The default port is 25.
- Username:
- Enter the name
of a valid e-mail account on the server in the Username field;
PageSentry will ask the server if this user exists. Most mail
servers generally have "root" or "postmaster"defined, even if the SMTP server is only used to forward outgoing
mail. You can also simply use your own mail account name, assuming
you have an account on the server you are testing.
FTP
PageSentry uses a URL to locate a file on an FTP server, verify
that it exists, and check it's data. When this Sentry runs, it
downloads the file, computes a checksum, and records the length
of the file for later comparison.
In addition to the common configuration options, the FTP Sentry
has the following options:
- Retrieve File
- This is the URL of the file to get via FTP. It needs to be a complete
URL as in "ftp://ftp.yourcom.com/file.hqx." You can
specify a non-standard TCP port number by appending a colon (":")
and the number to the machine name. The default port is 21.
- Username and Password:
- A Sentry uses information in these fields when logging into an FTP
server. Most servers will have "anonymous" defined
and will want your e-mail address as the password. You must complete
these fields.
- Checksum and Length
- You cannot edit these fields, but they act much like the "Verify
Phrase" field in the HTTP Sentry. When the file is retrieved
from the FTP server, the Sentry will compare the checksum and
the length of the new file with those values stored in these fields.
This ensures that the file is the same and has not been corrupted.
You can click on the "Execute Test" button to retrieve
the file immediately and display these values. If you do not
click the "Execute Test" button before clicking "OK,"the Sentry will store the values from the first retrieval the
Sentry performs. If the length is different or the checksum doesn't
match, the Sentry will "fail" and run the appropriate
Notifier.
Telnet
Most UNIX computers and terminal servers are capable of running
a Telnet daemon (pronounced dee-mon), which allows remote users
to login to perform tasks and issue commands. In addition, many
modern networking devices such as hubs, routers, and bridges can
also host limited Telnet capabilities that allow for remote management
and administration. However, since PageSentry can't download and
examine a file for a particular phrase, checksum, or length PageSentry
looks for a word or phrase during the login procedure as a means
of verifying the server's availability.
To configure the Sentry, just fill in the appropriate fields.
In addition to the common configuration options, the Telnet Sentry
has the following options:
- Machine Name
- The Machine Name is the IP name or address of the UNIX computer, terminal
server, or networking device you want to test. You can specify
a non-standard TCP port number by appending a colon and the number
to the machine name (e.g., :8001). The default port is 23.
- Verify Phrase
- The "Verify
Phrase" field is the text that PageSentry checks for in the
greeting text sent by the Telnet server when a connection is opened.
Use your favorite Telnet client (such as NCSA Telnet) to connect
and see this message.
Common phrases will be "login:" or "password:."Many servers also send a line with the name and version of the
operating system they are running, like "SunOS UNIX."You can leave this field blank and PageSentry will only test whether
or not a connection can be made. String comparisons are not case
sensitive.
DNS
The DNS Sentry acts as a low-level resolver and connects directly
to the target Domain Name System server to perform a query.
This means that the test is completely independent of the host
files, DNR cache, or resolver code on the PageSentry Macintosh,
whether running Open Transport or MacTCP.
To configure the Sentry just fill in the appropriate fields. In
addition to the common configuration options, the DNS Sentry has
the following options:
- DNS Address
- This is the domain name or IP number of the machine running the DNS
server that you wish to monitor. The Sentry will connect to TCP
port 53 (the default) to perform the query. Using a domain name
in the DNS Address field requires that the domain name be resolved
before the Domain Name Server can be tested, creating ambiguity
in testing. It is best to enter the IP address of your Domain
Name Server, as opposed to the domain name, so that the test will
always report the correct error in the event of a DNS failure.
- Domain Name
- This is the
domain name the Sentry will try to resolve into an IP number.
You can check the intranet ability of the name server by asking
it to resolve a machine name within the domain for which it is
authoritative (like yourmachine.yourcompany.com). Or, you can
check its Internet ability by asking it to resolve an external
machine name (like www.foreign.com). If you choose domain names
that can resolve to multiple IP addresses (like www.apple.com
or www.microsoft.com), different answers will be returned to PageSentry
each time it tries to resolve that domain name. In this case,
use the "*" option in the IP Address field, described
below.
- IP Address
- This is the
IP number that will be compared with the address returned from
the DNS being tested. You can use the Execute Now button to have
PageSentry fill in this field, or you can fill it in the expected
IP number yourself.
In some cases, domain names can resolve to more than one IP Address,
as is the case with "Round Robin" Web sites. For this
reason, you can enter an asterisk ("*") in the IP Address
field, which tells PageSentry that any valid response from the
Domain Name Server is acceptable. TCP/IP problems and Errors
sent by the DNS will still be reported by PageSentry, but in this
case PageSentry will not verify the exact IP Address returned.
Pulses
A unique feature of PageSentry is its ability to monitor itself
using a "Pulse." To ensure reliability, PageSentry will
check in with you periodically via e-mail or an AppleEvent-aware
application to let you know that PageSentry is "on the job."The final link in the chain of server monitoring, however, is
you: If you don't hear from PageSentry on schedule, then something
has gone wrong with the PageSentry Mac, the network connection,
or the notification application (if you're using an AppleEvent-driven
application in a Notifier).
To configure the Pulse just fill in the appropriate fields. In
addition to the common configuration options, the Pulse Sentry
has the following options:
- Scheduled At
- This fields specifies the "anchor time" PageSentry uses to
synchronize the pulse. For example, if you have a pulse Frequency
of 6 hours and an anchor time of midnight, as in the above example,
the Sentry will only run at midnight, 6 AM, noon, and 6 PM. It
won't care when you last rebooted or launched PageSentry; it will
run at those times, and only then. This is different from other
Sentries, which would run 6 hours after PageSentry was launched.
The Pulse can be sent as low as every 10 minutes and as high as
one month, which is also different from the other types of Sentries.
- Status Report
- This field
determines what is reported by the Pulse to the e-mail or AppleEvent
notification. You may choose to have the Pulse Sentry send nothing,
a simple one-line status report, or a detailed multiple-line status
report. This field effects the report sent via mail or AppleEvent,
not the option selected in the Logging Preferences, which determines
what is written to the local disk in the log files.
[ Previous | Table Of Contents | Next ]
Copyright © 1996 Maxum Development Corporation
820 South Bartlett Road - Suite 104
Streamwood, IL 60107
http://www.maxum.com/